sonar.projectKey={{baseName}}
sonar.projectName={{projectName}}
# used for local sonarqube Docker image
sonar.login=admin
sonar.password=admin

sonar.sources=src/main/
sonar.tests=src/test/
sonar.host.url=http://localhost:9001

sonar.test.inclusions=src/test/**/*.*, src/main/webapp/**/*.spec.ts
sonar.coverage.jacoco.xmlReportPaths={{projectBuildDirectory}}/jacoco/jacoco.xml
sonar.java.codeCoveragePlugin=jacoco
sonar.junit.reportPaths={{projectBuildDirectory}}/surefire-reports,{{projectBuildDirectory}}/failsafe-reports

sonar.sourceEncoding=UTF-8
sonar.exclusions=\
  src/main/webapp/app/*.ts,\
  src/main/webapp/content/**/*.*,\
  {{projectBuildDirectory}}/classes/static/**/*.*,\
  src/main/webapp/app/index.tsx,\
  src/main/webapp/main.ts

sonar.issue.ignore.multicriteria=S117,S119,S125_1,S125_2,S3437,S4502,S4684,S4032,S5778,S6206,S6548,S6437,UndocumentedApi,S2301,S7027

# Rule: Local variable and method parameter names should comply with a naming convention
# Handled with checkstyle. Should be revisited with java 25 once Unnamed Patterns and Variables are available (JEP 443)
sonar.issue.ignore.multicriteria.S117.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.S117.ruleKey=java:S117

# Rule: Generic types on one character
sonar.issue.ignore.multicriteria.S119.resourceKey=src/**/java/**/*
sonar.issue.ignore.multicriteria.S119.ruleKey=java:S119

# Rule https://rules.sonarsource.com/java/RSPEC-3437 is ignored, as a JPA-managed field cannot be transient
sonar.issue.ignore.multicriteria.S3437.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.S3437.ruleKey=squid:S3437

# Rule https://rules.sonarsource.com/java/RSPEC-1176 is ignored, as we want to follow "clean code" guidelines and classes, methods and arguments names should be self-explanatory
sonar.issue.ignore.multicriteria.UndocumentedApi.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.UndocumentedApi.ruleKey=squid:UndocumentedApi

# Rule https://rules.sonarsource.com/java/RSPEC-4502 is ignored, as for JWT tokens we are not subject to CSRF attack
sonar.issue.ignore.multicriteria.S4502.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.S4502.ruleKey=java:S4502

# Rule https://rules.sonarsource.com/java/RSPEC-4684
sonar.issue.ignore.multicriteria.S4684.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.S4684.ruleKey=java:S4684

# Rule: Packages containing only "package-info.java" should be removed
sonar.issue.ignore.multicriteria.S4032.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.S4032.ruleKey=java:S4032

# Rule: Only one method invocation is expected when testing runtime exceptions
sonar.issue.ignore.multicriteria.S5778.resourceKey=src/test/java/**/*
sonar.issue.ignore.multicriteria.S5778.ruleKey=java:S5778

# Rule: Use record when possible in primary
sonar.issue.ignore.multicriteria.S6206.resourceKey=src/main/java/**/infrastructure/primary/**/*
sonar.issue.ignore.multicriteria.S6206.ruleKey=java:S6206

# Rule: Sections of code should not be commented out
sonar.issue.ignore.multicriteria.S125_1.ruleKey=xml:S125
sonar.issue.ignore.multicriteria.S125_1.resourceKey=**/logback-spring.xml
sonar.issue.ignore.multicriteria.S125_2.ruleKey=xml:S125
sonar.issue.ignore.multicriteria.S125_2.resourceKey=**/config/liquibase/master.xml

# Rule: Use Singleton pattern with care
sonar.issue.ignore.multicriteria.S6548.resourceKey=src/main/java/**/*
sonar.issue.ignore.multicriteria.S6548.ruleKey=java:S6548

# Rule: Credentials should not be hard-coded
sonar.issue.ignore.multicriteria.S6437.resourceKey=src/main/resources/config/application.yml
sonar.issue.ignore.multicriteria.S6437.ruleKey=java:S6437

# Rule: Methods should not contain selector parameters
sonar.issue.ignore.multicriteria.S2301.resourceKey=src/main/webapp/app/auth/oauth2-auth.service.ts
sonar.issue.ignore.multicriteria.S2301.ruleKey=typescript:S2301

# Rule: Circular dependencies between classes in the same package should be resolved
sonar.issue.ignore.multicriteria.S7027.resourceKey=src/**/java/**/*
sonar.issue.ignore.multicriteria.S7027.ruleKey=javaarchitecture:S7027
